package beantoxml;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.net.URLEncoder;

public class EncodeAdapter extends XmlAdapter<String, String> {


    @Override
    public String unmarshal(final String v) throws Exception {
        return null;
    }

    @Override
    public String marshal(final String v) throws Exception {
        return URLEncoder.encode(v, "GBK");
    }
}